package com.longe.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class Shop implements Serializable {

    private static final long serialVersionUID = 6765047953386902003L;

    @Excel(name="店铺名", needMerge = true)
    private String name;

    @Excel(name="店铺地址", needMerge = true)
    private String addr;

    /**@ExcelEntity注解**/
    @ExcelEntity(id = "absent")
    private Proprietor proprietor;

    /**@ExcelCollection注解**/
    @ExcelCollection(name="在售商品", orderNum = "4")
    private List<Goods> goods;

    public Shop(String name, String addr, Proprietor proprietor, List<Goods> goods) {
        this.name = name;
        this.addr = addr;
        this.proprietor = proprietor;
        this.goods = goods;
    }
}
